package gui;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;

import com.google.inject.Inject;

public class ErrorDialog {

  public static void showError(final String message, final Shell shell) {    
    shell.getDisplay().asyncExec(new Runnable() {
      public void run() {
        MessageBox messageBox = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
        messageBox.setMessage(message);
        messageBox.setText("Error");
        messageBox.open();
      }
    });
  }

}
